import java.util.Scanner;


public class mainInteractiveRoller {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String inputDiceString;
		int rollTotal;
		
		Scanner sc = new Scanner(System.in);
		RollDAO newRoll = new RollDAOImpl();
		
		System.out.println("Please enter a roll: ");
		inputDiceString = sc.nextLine();
		
		try {
			rollTotal = newRoll.rollFromString(inputDiceString);
			System.out.println(rollTotal);
		} catch (DiceException e) {
			System.out.println("Dice Roll Failed: " + e);
		} 
		
	}

}
